package light.head.dao.inv;

import light.head.framework.base.BaseDAO;
import light.head.model.inv.InvBillCode;

import org.springframework.stereotype.Service;

/**
 * 单据生成计数器
 * @author yangguanghe @date 2014-6-18 @time 上午10:39:56
 *
 */
@Service
public class InvBillCodeDAO extends BaseDAO<InvBillCode, Integer> {
	
	private final static String sql_getByBcc = " FROM InvBillCode b WHERE b.bcc = ?";
	
	/**
	 * 通过单据配置编号获取单据生成计数信息
	 *@param bcc	单据配置编号
	 *@author yangguanghe [2014-6-18_上午10:48:03]
	 */
	public InvBillCode getByBcc (Integer bcc) {
		if (null == bcc) return null;
		return (InvBillCode) get(sql_getByBcc, bcc);
	}

}
